import request from '@/utils/request'
// 申请事项设定依据 API接口
const std_basisApi = {
    list: '/std_basis/list',
    save: '/std_basis/save',
    view: '/std_basis/view',
    del: '/std_basis/delete',
    dels: '/std_basis/batchDel',
    output: '/std_basis/output',
    exportExcelTemplate: '/std_basis/exportExcelTemplate',
    importExcel: '/std_basis/importExcel'
}

/**
 * 导入申请事项设定依据Excel
 */
export function importExcel(data) {
  var body = new FormData()
  body.append("file", data);
  return request({
    url: std_basisApi.importExcel,
    headers: {"Content-Type": "multipart/form-data"},
    method: 'post',
    data: body
  })
}

/**
 * 导出申请事项设定依据Excel模板
 */
export function exportExcelTemplate () {
    return request({
        url: std_basisApi.exportExcelTemplate,
        method: 'post',
        responseType: 'blob'
    })
}

/**
 * 导出申请事项设定依据
 */
export function output (data) {
    return request({
        url: std_basisApi.output,
        method: 'post',
        data: data ,
        responseType: 'blob'
    })
}
/**
 * 批量删除申请事项设定依据
 * @param {*} ids
 */
export function delStd_basiss (ids) {
    return request({
        url: std_basisApi.dels,
        method: 'post',
        params: {ids}
    })
}
/**
 * 删除申请事项设定依据
 * @param {*} id
 */
export function delStd_basis (id) {
    return request({
        url: std_basisApi.del,
        method: 'post',
        params: {id}
    })
}
/**
 * 查看、编辑申请事项设定依据
 * @param {*} id
 */
export function viewStd_basis (id) {
    return request({
        url: std_basisApi.view,
        method: 'get',
        params: {id}
    })
}
/**
 * 保存申请事项设定依据
 * @param {*} body
 */
export function saveStd_basis (body) {
    return request({
        url: std_basisApi.save,
        method: 'post',
        data: body
    })
}
/**
 * 查询申请事项设定依据列表
 * @param {*} body
 */
export function queryStd_basisList (body) {
    return request({
        url: std_basisApi.list,
        method: 'post',
        data: body
    })
}